<?php
namespace backend\controllers;

/**
 * Created by PhpStorm.
 * User: FOCUS
 * Date: 2015/1/22
 * Time: 0:07
 */
use backend\models\Option;
use \yii\web\Controller;

class SystemController extends Controller
{
    public function actionOption()
    {
        $model = Option::findOne(1);
        if (\Yii::$app->request->isPost) {
            $data = \Yii::$app->request->post('Option');
            $model->setAttributes($data);
            $model->save();
        }
        return $this->render('option', ['model' => $model]);
    }
}